package com.thinkTank.oa.lucene;

import java.util.List;

import org.apache.solr.client.solrj.beans.Field;

/***
 * 项目检索实体类
 * @date 2018-09-13
 * @author dq
 *
 */
public class LuceneProject {
	@Field
	String projectId;//项目Id
	@Field
	String  projectNumber;//项目编号
	@Field
	String  source;//项目来源
	@Field
	String sourceRemark;//项目来源备注
	@Field
	List<String> projectType;//项目类型
	@Field
	List<String> researchField;//项目领域
	@Field
	String  area;//项目地区
	@Field
	String  projectName;//项目名称
	@Field
	String projectStatus;//项目状态
	@Field
	String introduction;//项目简介
	@Field
	String keyWords;//关键词
	@Field
	List<String> projectHolder;//持有人
	@Field
	String projectContactId;//联系人
	@Field
	String projectContactName;//联系人姓名
	@Field
	String technical;//技术成熟度下拉选项
	@Field
	String projectRequirements;// 项目需求
	@Field
	String marketProspect;//市场前景
	@Field
	String technicalMaturity;//技术成熟度
	
	public static String getFileds(String key){
		if(key==null||key.equals("")){
			return "project";
		}else if(key.equals("projectId")){
			return "projectId";
		}else if(key.toLowerCase().equals("pn")){
			return "projectNumber";
		}else if(key.toLowerCase().equals("sr")){
			return "sourceRemark";
		}else if(key.toLowerCase().equals("pt")){
			return "projectType";
		}else if(key.toLowerCase().equals("rf")){
			return "researchField";
		}else if(key.toLowerCase().equals("area")){
			return "area";
		}else if(key.toLowerCase().equals("pna")){
			return "projectName";
		}else if(key.toLowerCase().equals("ps")){
			return "projectStatus";
		}else if(key.toLowerCase().equals("int")){
			return "introduction";
		}else if(key.toLowerCase().equals("ph")){
			return "projectHolder";
		}else if(key.toLowerCase().equals("pcn")){
			return "projectContactName";
		}else if(key.toLowerCase().equals("te")){
			return "technical";
		}else if(key.toLowerCase().equals("prs")){
			return "projectRequirements";
		}else if(key.toLowerCase().equals("mp")){
			return "marketProspect";
		}else if(key.toLowerCase().equals("tmy")){
			return "technicalMaturity";
		}else{
			return "project";
		}
	}
	public  LuceneProject(){}
	
	public LuceneProject(String projectNumber,String projectId,String  source,String sourceRemark,List<String> projectType,List<String> researchField,String  area,
			String  projectName,String projectStatus,String introduction,String keyWords,List<String> projectHolder,String projectContactId,String projectContactName,String technical,String projectRequirements,String marketProspect,String technicalMaturity){
		super();
		this.projectNumber = projectNumber;
		this.projectId =  projectId;
		this.source = source;
		this.sourceRemark = sourceRemark;
		this.projectType = projectType;
		this.researchField =researchField;
		this.area =area;
		this.projectName =projectName;
		this.projectStatus = projectStatus;
		this.introduction =introduction;
		this.keyWords= keyWords;
		this.projectHolder =projectHolder;
		this.projectContactId =projectContactId;
		this.projectContactName= projectContactName;
		this.technical =technical;
		this.projectRequirements =projectRequirements;
		this.marketProspect =marketProspect;
		this.technicalMaturity= technicalMaturity;
	}

	public String getProType(){
		
		if(null!=projectType){
			String  str="";
			for(String s :projectType){
				str+=s+",";
			}
			if(!"".equals(str)){
				str=str.substring(0,str.length()-1);
			}
			return str;
				
		}
		return null;
	}
	public String getProjectNumber() {
		return projectNumber;
	}

	public void setProjectNumber(String projectNumber) {
		this.projectNumber = projectNumber;
	}

	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getSourceRemark() {
		return sourceRemark;
	}

	public void setSourceRemark(String sourceRemark) {
		this.sourceRemark = sourceRemark;
	}

	public List<String> getProjectType() {
		return projectType;
	}

	public void setProjectType(List<String> projectType) {
		this.projectType = projectType;
	}

	public List<String> getResearchField() {
		return researchField;
	}

	public void setResearchField(List<String> researchField) {
		this.researchField = researchField;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public String getProjectStatus() {
		return projectStatus;
	}

	public void setProjectStatus(String projectStatus) {
		this.projectStatus = projectStatus;
	}

	public String getIntroduction() {
		return introduction;
	}

	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	public String getKeyWords() {
		return keyWords;
	}

	public void setKeyWords(String keyWords) {
		this.keyWords = keyWords;
	}

	public List<String> getProjectHolder() {
		return projectHolder;
	}

	public void setProjectHolder(List<String> projectHolder) {
		this.projectHolder = projectHolder;
	}

	public String getProjectContactId() {
		return projectContactId;
	}

	public void setProjectContactId(String projectContactId) {
		this.projectContactId = projectContactId;
	}

	public String getProjectContactName() {
		return projectContactName;
	}

	public void setProjectContactName(String projectContactName) {
		this.projectContactName = projectContactName;
	}

	public String getTechnical() {
		return technical;
	}

	public void setTechnical(String technical) {
		this.technical = technical;
	}

	public String getProjectRequirements() {
		return projectRequirements;
	}

	public void setProjectRequirements(String projectRequirements) {
		this.projectRequirements = projectRequirements;
	}

	public String getMarketProspect() {
		return marketProspect;
	}

	public void setMarketProspect(String marketProspect) {
		this.marketProspect = marketProspect;
	}

	public String getTechnicalMaturity() {
		return technicalMaturity;
	}

	public void setTechnicalMaturity(String technicalMaturity) {
		this.technicalMaturity = technicalMaturity;
	}
	
}
